<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
body {
	font-size: 70%;
	font-family: verdana, helvetica, arial, sans-serif;
}
</style>
<script type="text/javascript">
	function draw2dpic_1() {
		var c = document.getElementById("myCanvas");
		var cxt = c.getContext("2d");
		cxt.moveTo(20, 20);
		cxt.lineTo(250, 50);
		cxt.lineTo(40, 50);
		cxt.stroke();
	}

	function draw2dpic_2() {
		var c = document.getElementById("myCanvas");
		var cxt = c.getContext("2d");
		cxt.fillStyle = "#FF0000";
		cxt.beginPath();
		cxt.arc(70, 18, 15, 0, Math.PI * 2, true);
		cxt.closePath();
		cxt.fill();
	}

	function draw2dpic_3() {
		var c = document.getElementById("myCanvas");
		var cxt = c.getContext("2d");
		var grd = cxt.createLinearGradient(0, 0, 175, 50);
		grd.addColorStop(0, "#FF0000");
		grd.addColorStop(1, "#00FF00");
		cxt.fillStyle = grd;
		cxt.fillRect(0, 0, 175, 100);
	}
	function draw2dpic_4() {
		var c = document.getElementById("myCanvas");
		var cxt = c.getContext("2d");
		var img = new Image()
		img.src = "img/oono.jpg"
		cxt.drawImage(img, 0, 0);
	}
</script>
</head>

<body>
	<p>画图画图</p>

	<canvas id="myCanvas" width="300" height="200"
		style="border: 1px solid #c3c3c3;">
       Your browser does not support the canvas element.
    </canvas>

	<!-- <div id="coordiv"
		style="float: left; width: 400px; height: 250px; border: 5px solid #b1c3c3;"
		onmousemove="cnvs_getCoordinates(event)"
		onmouseout="cnvs_clearCoordinates()"></div> -->

	<div id="drawdiv">
		<button id="button1" onclick="draw2dpic_1();"
			style="width: 50px; height: 30px;">OK</button>
	</div>

	<br />
	<br />
	<br />
	<div id="xycoordinates"></div>
</body>
</html>